package com.spring.logging;

import java.io.Serializable;

/**
 * @author liyuncong
 * @version 1.0
 * @file LogAdapter
 * @brief LogAdapter
 * @details LogAdapter
 * @date 2022-12-08
 *
 * Edit History
 * ----------------------------------------------------------------------------
 * DATE                     NAME               DESCRIPTION
 * 2022-12-08               liyuncong          Created
 */
final class LogAdapter {

    public static Log createLog(String name) {
        // TODO
        return Log4jAdapter.createLog(name);
    }

    private static class Log4jAdapter {
        public static Log createLog(String name) {
            return new Log4jLog(name);
        }
    }

    private static class Log4jLog implements Log, Serializable {

        // TODO log impl

        public Log4jLog(String name) {

        }

        @Override
        public boolean isFatalEnabled() {
            return false;
        }

        @Override
        public boolean isErrorEnabled() {
            return false;
        }

        @Override
        public boolean isWarnEnabled() {
            return false;
        }

        @Override
        public boolean isInfoEnabled() {
            return false;
        }

        @Override
        public boolean isDebugEnabled() {
            return false;
        }

        @Override
        public boolean isTraceEnabled() {
            return false;
        }

        @Override
        public void fatal(Object message) {

        }

        @Override
        public void fatal(Object message, Throwable throwable) {

        }

        @Override
        public void error(Object message) {

        }

        @Override
        public void error(Object message, Throwable throwable) {

        }

        @Override
        public void warn(Object message) {

        }

        @Override
        public void warn(Object message, Throwable throwable) {

        }

        @Override
        public void info(Object message) {

        }

        @Override
        public void info(Object message, Throwable throwable) {

        }

        @Override
        public void debug(Object message) {

        }

        @Override
        public void debug(Object message, Throwable throwable) {

        }

        @Override
        public void trace(Object message) {

        }

        @Override
        public void trace(Object message, Throwable throwable) {

        }
    }
}
